package org.fangzz.cameramgr.cameramonitor.model;

import org.hibernate.annotations.ColumnDefault;

import javax.persistence.*;


/**
 * 摄像头
 * Created by XxChen on 2018/6/22.
 */


@Entity
@Table(name = "camera_tb")
public class Camera extends BaseIdentity {

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "store_id")
    private Store store;

    @Column(name = "camera_name")
    private String name;

    @Column(name = "live_address")
    private String live;  //直播地址

    @Column(name = "record_address")
    private String record; //录播地址

    private String rtspStreamAddress; //rtsp地址

    private String rtmpStreamAddress; //rtmp地址

    @ColumnDefault(value = "0")
    private Integer usingAmount;   //使用统计

    private String area;

    private boolean alive;


    public Store getStore() {
        return store;
    }

    public void setStore(Store store) {
        this.store = store;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLive() {
        return live;
    }

    public void setLive(String liveAddress) {
        this.live = live;
    }

    public String getRecord() {
        return record;
    }

    public void setRecord(String recordAddress) {
        this.record = record;
    }

    public String getRtspStreamAddress() {
        return rtspStreamAddress;
    }

    public void setRtspStreamAddress(String rtspStreamAddress) {
        this.rtspStreamAddress = rtspStreamAddress;
    }

    public String getRtmpStreamAddress() {
        return rtmpStreamAddress;
    }

    public void setRtmpStreamAddress(String rtmpStreamAddress) {
        this.rtmpStreamAddress = rtmpStreamAddress;
    }

    public Integer getUsingAmount() {
        return usingAmount;
    }

    public void setUsingAmount(Integer usingAmount) {
        this.usingAmount = usingAmount;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public boolean isAlive() {
        return alive;
    }

    public void setAlive(boolean alive) {
        this.alive = alive;
    }
}
